import type { PropType } from 'vue';
import { string } from 'vue-types';

export const basicProps = {
  // 随机值
  key: {
    type: Number,
    default: Math.random(),
  },
  // 已有数据
  list: {
    type: Array,
    default: () => [],
  },
  // 文件最大多少MB
  maxSize: {
    type: Number as PropType<number>,
    default: 2,
  },
  // 最大数量的文件，Infinity不限制
  maxNumber: {
    type: Number as PropType<number>,
    default: Infinity,
  },
  // 根据后缀，或者其他
  accept: {
    type: Array as PropType<string[]>,
    default: () => ['jpg', 'png', 'jepg'],
    // default: () => [],
  },
  uploadParams: {
    type: Object as PropType<any>,
    default: {},
  },
  api: {
    type: String,
    default: '',
    required: true,
  },
  // 上传类型
  listType: {
    type: String,
    default: 'picture-card',
  },
  // 返回字体类型
  responseType: {
    type: String,
    default: 'arr',
  },
};
